import os
import json
import cv2

root = './data/json/Bago_highway_1.json'
file = open(root, 'r')
dict = json.load(file)
for key, values in dict.items():
    img = cv2.imread('./data/all_data/Bago_highway_1/' + key + '.jpg')
    for value in values:
        x = int(value[1])
        y = int(value[2])
        w = int(value[3])
        h = int(value[4])
        cv2.rectangle(img, (x, y), (x + w, y + h), (0, 255, 0), 5)
    cv2.imwrite('./data/show/Bago_highway_1/' + key + '.jpg', img)

